package com.app.micaihu.view.newsdetail.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import com.app.micaihu.bean.news.VideoShow;
import com.app.utils.parallaxviewpager.ParallaxFragmentPagerAdapter;

import java.util.List;

/**
 * Created by Guo on 2017/1/4.
 */

public class VideoPageAdapter extends ParallaxFragmentPagerAdapter {


    private List<VideoShow> tabLists;

    public VideoPageAdapter(FragmentManager fm, List fragments, List<VideoShow> tabLists) {
        super(fm, fragments);
        this.tabLists = tabLists;
    }

    @Override
    public Fragment getItem(int position) {

        return fragments.get(position);
    }


    @Override
    public CharSequence getPageTitle(int position) {
        if (tabLists != null && !tabLists.isEmpty()) {
            return (tabLists.get(position).getSetTitle());
        }
        return "";
    }
}